import request from '@/utils/request'

/**
 * 获取公告列表信息
 * @returns
 */
export const getNoticeList = () => {
  return request('/api/notice', 'get')
}

/**
 * 发布公告🪧
 * @returns
 */
export const publicNotice = ({ title, content }) => {
  return request('/api/notice/publish', 'post', { title, content })
}

/**
 * 删除公告🪧
 * @returns
 */
export const delNotice = ({ nid }) => {
  return request('api/notice/del', 'delete', { nid })
}

/**
 * 更新公告🪧
 * @returns
 */
export const updateNotice = ({ title, content, nid }) => {
  return request('/api/notice/update', 'post', { title, content, nid })
}
